# coding=utf-8
from ml.knn.dating.read_data import *

res_list = ['not at all', 'in small does', 'in large doses']

games = float(raw_input("percentage of time spent playing video games?"))
fly = float(raw_input("frequent flier miles earned per year?"))
ice = float(raw_input("liters of ice cream consumed per year?"))

dating_mat, labels = file2matrix("datingTestSet2.txt")
normMat, ranges, minVals = auto_norm(dating_mat)

in_arr = array([fly, games, ice])
classifier_res = classify0((in_arr - minVals) / ranges, normMat, labels, 3)

print("You will probably like this person: " + res_list[classifier_res - 1])
